package com.tulele.vtool.task.async;

import com.tulele.vtool.service.IUserArticleTypeInfoService;
import com.tulele.vtool.utils.SysConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class ArticleAsyncTask {

    @Autowired
    private IUserArticleTypeInfoService userArticleTypeInfoService;

    /**
     * 设置用户默认关注文章类型
     * @param userId
     */
    public void setUserDefaultSubArticleType(Integer userId) {

        log.info("[enter setUserDefaultSubArticleType] = " + userId);

        userArticleTypeInfoService.recordUserArticleTypeInfo(userId, SysConstant.DEFAULT_SUBSCRIBE_ARTICLE_TYPE);// 财税、正能量、健康养生

        log.info("[end setUserDefaultSubArticleType] = " + userId);

    }

}
